Skip to content

상태바 컴포넌트 개발#23

Merged
HWAN0218 merged 3 commits into
mainfrom
feature/progress-bar
Feb 3, 2026
Merged

상태바 컴포넌트 개발#23
HWAN0218 merged 3 commits into
mainfrom
feature/progress-bar

Conversation

@HWAN0218

@HWAN0218 HWAN0218 commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 상태바 아토믹 컴포넌트 개발

Issue

Scope

  • 포함

    • 진행률 애니메이션
  • 특이사항
    없음

@HWAN0218 HWAN0218 added this to the 컴포넌트 milestone Feb 3, 2026
@HWAN0218 HWAN0218 requested review from a team, Jieunsse, jungwon123 and yooolleee February 3, 2026 09:53
@HWAN0218 HWAN0218 self-assigned this Feb 3, 2026
@HWAN0218 HWAN0218 added the 기능추가 기능개발 및 추가할 때 사용해주세요. label Feb 3, 2026
@HWAN0218 HWAN0218 added this to workers Feb 3, 2026
@github-project-automation github-project-automation Bot moved this to 개발 대기중 in workers Feb 3, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @HWAN0218, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 애플리케이션 내에서 진행 상태를 명확하게 시각화하기 위한 새로운 ProgressBar 컴포넌트를 도입합니다. 이 컴포넌트는 진행률 애니메이션과 반응형 디자인을 지원하여 사용자 경험을 개선하고, 다양한 상황에서 유연하게 활용될 수 있도록 설계되었습니다.

Highlights

  • 새로운 컴포넌트 개발: 진행률을 시각적으로 표시하는 ProgressBar 아토믹 컴포넌트가 새로 개발되었습니다.
  • 애니메이션 기능: 진행률 변화에 따라 부드러운 애니메이션 효과를 제공하며, durationMs prop으로 속도를 조절할 수 있습니다.
  • 반응형 디자인: 미디어 쿼리를 사용하여 다양한 화면 크기(744px, 1024px 이상)에 맞춰 진행률 바의 너비와 높이가 조절됩니다.
  • 유연한 값 설정: value (0~1 비율) 또는 done/total 값을 통해 진행률을 설정할 수 있습니다.
  • 접근성 고려: aria-label, aria-valuemin, aria-valuemax, aria-valuenow 속성을 사용하여 접근성을 향상시켰습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/components/progressbar/ProgressBar.module.css
    • 진행률 바의 트랙(track)과 채워지는 부분(fill)에 대한 스타일이 추가되었습니다.
    • 반복 선형 그라디언트 배경과 둥근 모서리 디자인이 적용되었습니다.
    • 미디어 쿼리를 사용하여 744px 및 1024px 이상 화면에서 trackmax-widthheight를 조절하는 반응형 스타일이 정의되었습니다.
  • src/components/progressbar/ProgressBar.tsx
    • ProgressBar React 컴포넌트가 새로 생성되었습니다.
    • value, done, total prop을 통해 진행률을 계산하는 로직이 포함되었습니다.
    • animate, replayOnMount, durationMs prop을 사용하여 애니메이션 동작을 제어합니다.
    • useEffect 훅을 사용하여 컴포넌트 마운트 시 애니메이션을 처리하고, requestAnimationFrame을 활용하여 부드러운 전환을 구현합니다.
    • aria 속성을 통해 접근성을 확보했습니다.
  • src/components/progressbar/index.ts
    • ProgressBar 컴포넌트와 ProgressBarProps 타입이 외부로 내보내지도록 설정되었습니다.
Activity
  • 이 PR에 대한 추가적인 코멘트나 리뷰 활동은 아직 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

상태바 컴포넌트 추가에 대한 PR을 검토했습니다. 전반적으로 잘 작성되었지만, 몇 가지 개선점을 제안합니다. CSS에서 repeating-linear-gradient 구문 오류가 있어 의도한 배경이 렌더링되지 않는 버그를 수정해야 합니다. 또한, 특정 조건에서 컴포넌트가 처음 렌더링될 때 깜빡이는 현상이 발생할 수 있는 로직을 수정했습니다. 마지막으로, useEffect의 복잡도를 낮추기 위한 리팩토링을 제안했습니다. 자세한 내용은 각 주석을 확인해주세요.

Comment on lines +11 to +17
repeating-linear-gradient(
-45deg,
rgba(0, 0, 0, 0.04) 0px,
rgba(0, 0, 0, 0.04) 40px,
rgba(255, 255, 255, 0.7) 10px,
rgba(255, 255, 255, 0.7) 80px
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

repeating-linear-gradientcolor-stop 순서가 올바르지 않아 그래디언트가 렌더링되지 않는 버그가 있습니다. color-stop의 위치 값은 오름차순으로 정렬되어야 합니다. 현재 코드에서는 40px 다음에 10px가 나와서 유효하지 않은 구문입니다.
의도하신 디자인이 줄무늬 패턴이라고 추측하여 아래와 같이 수정하는 것을 제안합니다. 이 코드는 40px 너비의 어두운 줄과 40px 너비의 밝은 줄이 반복되는 패턴을 만듭니다.

Suggested change
repeating-linear-gradient(
-45deg,
rgba(0, 0, 0, 0.04) 0px,
rgba(0, 0, 0, 0.04) 40px,
rgba(255, 255, 255, 0.7) 10px,
rgba(255, 255, 255, 0.7) 80px
),
repeating-linear-gradient(
-45deg,
rgba(0, 0, 0, 0.04) 0px,
rgba(0, 0, 0, 0.04) 40px,
rgba(255, 255, 255, 0.7) 40px,
rgba(255, 255, 255, 0.7) 80px
),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 완료

Comment on lines +56 to +89
useEffect(() => {
const el = fillRef.current;
if (!el) return;


el.style.setProperty('--pb-duration', animate ? `${durationMs}ms` : '0ms');


if (!animate) {
el.style.width = `${targetPercent}%`;
didMountRef.current = true;
return;
}

const isFirstMount = !didMountRef.current;
didMountRef.current = true;


if (replayOnMount && isFirstMount) {
el.style.width = '0%';

if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
rafRef.current = requestAnimationFrame(() => {
el.style.width = `${targetPercent}%`;
});

return () => {
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
};
}

// 값 변경 시 자연스럽게 이동
el.style.width = `${targetPercent}%`;
}, [animate, durationMs, replayOnMount, targetPercent]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

현재 useEffect 훅은 애니메이션 지속 시간 설정, 애니메이션 비활성화 처리, 첫 마운트 시 애니메이션 재생 등 여러 책임을 가지고 있어 복잡성이 높습니다.
코드를 더 읽기 쉽고 유지보수하기 좋게 만들기 위해 이 useEffect를 여러 개의 작은 훅으로 분리하거나, 관련 로직을 useProgressAnimation과 같은 커스텀 훅으로 추출하는 것을 고려해 보세요.

예를 들어, --pb-duration CSS 변수를 설정하는 로직과 너비(width)를 업데이트하는 로직을 별도의 useEffect로 분리할 수 있습니다.

// 예시
useEffect(() => {
  const el = fillRef.current;
  if (!el) return;
  el.style.setProperty('--pb-duration', animate ? `${durationMs}ms` : '0ms');
}, [animate, durationMs]);

useEffect(() => {
  const el = fillRef.current;
  if (!el) return;

  // 너비 업데이트 및 애니메이션 로직
  // ...
}, [animate, replayOnMount, targetPercent]);

<div
ref={fillRef}
className={styles.fill}
style={{ width: replayOnMount ? '0%' : `${targetPercent}%` }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

animate prop이 false이고 replayOnMounttrue일 때, 프로그레스 바의 초기 너비가 0%로 설정되었다가 useEffect에 의해 즉시 targetPercent%로 변경됩니다. 이로 인해 원치 않는 깜빡임(flash)이 발생할 수 있습니다.
animatefalse일 때는 replayOnMount 설정과 관계없이 항상 targetPercent%로 초기화되어야 합니다.
아래와 같이 수정하여 애니메이션이 활성화된 경우에만 replayOnMount 로직이 초기 너비에 영향을 주도록 하는 것을 제안합니다.

Suggested change
style={{ width: replayOnMount ? '0%' : `${targetPercent}%` }}
style={{ width: animate && replayOnMount ? '0%' : `${targetPercent}%` }}

@Jieunsse Jieunsse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
고생 많으셨습니다!

@HWAN0218 HWAN0218 merged commit ebe2598 into main Feb 3, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from 개발 대기중 to 개발 완료 in workers Feb 3, 2026
@HWAN0218 HWAN0218 deleted the feature/progress-bar branch February 10, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능추가 기능개발 및 추가할 때 사용해주세요.

Projects

Status: 개발 완료

Development

Successfully merging this pull request may close these issues.

2 participants